package com.department.mydepartment.repository;

import com.department.mydepartment.entities.Article;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface ArticleRepository extends JpaRepository<Article,String> {

    /**
     * 根据标题、标签、类型查询文章
     * @param articleTitle
     * @return
     */
    List<Article> findByArticleTitleAndArticleTagAndArticleType(String articleTitle, String articleTag, String articleType);
    Article findByArticleId(String articleId);
    List<Article> findAll();
    List<Article> findByArticleTitle(String articleTitle);
    List<Article> findByArticleTag(String articleTag);
    List<Article> findByArticleType(String articleType);
    void deleteByArticleId(String articleId);
}
